import { handleActions } from 'redux-actions'
import { UPDATE_HOME_PAGE_TYPE_B } from './type'

const Schema = {
  showEmpty: false,
  networkerror: false,
  banners: [], // 轮播数组
  tabs: [
    {
      name: '全部'
    },
    {
      name: '兼职'
    },
    {
      name: '实习'
    },
    {
      name: '全职'
    }
  ],
  sorts: [
    {
      name: '排序'
    },
    {
      name: '兼职'
    },
    {
      name: '区域'
    },
    {
      name: '学历'
    }
  ],
  sortIndexActived: null, // 筛选按钮高亮index,
  personList: []
}

export default handleActions(
  {
    [UPDATE_HOME_PAGE_TYPE_B] (state, action) {
      return {
        ...state,
        ...action.payload
      }
    }
  },
  Schema
)
